1. Field of the Invention
The present invention generally relates to a data conversion device, an image data processing device, a data conversion method, a pattern matching method, and an image data processing method, and more particularly, to an image processing device using the data conversion device, and an image processing device using the image data processing device.
2. Description of the Related Art
As a processing capacity and a processing rate of a computer has been improved, a data processing amount by a computer has been increased, more often involving data conversions or corrections. For example, there are a variety of image data processes, such as: reading corrections (a CCD inter-line correction, a main-scanning resist adjustment, a shading correction, a dot correction, a vertical stripe correction, a γ conversion, etc.) for compensating or correcting reading distortions of RGB image data read by a document scanner; an image area separation of judging whether a read image is an edge (a character edge) or an inside (within a line width: a character inside) of a part having a binary shade (hereinafter simply referred to as character ), such as a character or a line, whether a halftone (dot) image, such as a photograph (hereinafter simply referred to as photograph), or further whether chromatic or achromatic; intermediate processes (a filtering process, a ground-color removal, a color conversion, i.e., a conversion to YMCK image data, an under-color removal, a main-scanning magnification variation, a main-scan shift, a main-scan mirroring, a sub-scan culling, a masking process, and a binarization upon outputting a monochromatic character) mainly for converting RGB image data having undergone the reading corrections into YMCK image data; and output corrections (a printer γ conversion and a gradation process) for correcting YMCK image data having undergone the intermediate processes so as to suit output properties of a printer; besides, the gradation process includes a density conversion, a dither process, a random dither process, and so forth.
Also, there are a variety of manners of processing data, such as a sum-of-product calculation in the filtering process, a pattern matching in the image-area separation, and a data conversion (e.g., a γ conversion) or an interpolative calculation (e.g., a shading correction) using an LUT (Look Up Table: conversion table).
When a preceding image data process and a following image data process are performed at different processing rates, image data needs to be temporarily stored in a buffer memory in each of the processes. In the filtering process or the pattern matching, items of image data of a pixel matrix of several lines need to be referred to simultaneously; therefore, line buffer memories for several lines are necessary. Accordingly, a buffer memory device is used in an image data process.
Japanese Laid-Open Patent Application No. 8-305329 discloses a signal processing device in which: an input data selector 6, an input data latch 10, one memory unit 1, an output data latch 11, and an output data selector 9 are connected in this order along the course of data; further, a writing address selector 7, a reading address selector 8, and a CPU 12 controlling each of the selectors are provided; in this structure, the memory unit 1 is used selectively as a line memory for a TV received image signal or as a lookup table for a nonlinear calculation, according to a setting of the selector by the CPU 12. Data of the lookup table is produced by the CPU 12, and is written to the memory unit 1.
Color image process and adjustment includes a variety of data conversions or data corrections, as mentioned above, which involves problems such as taking a lot of time for processing image data, and requiring a large memory for processing data. For example, supposing that a variety of image processes are performed by a processor provided exclusively for image processes in an image processing device, such as a digital copying machine or a multifunctional machine, increases of processes and data typical of color devices decrease the processing rate.
Especially in a color image reading (by a color scanner) and a color image formation (by a color printer), a processing amount in a color γ conversion becomes a serious problem. For example, a γ conversion of read RGB image data requires at least three LUTs for respective R, G and B data, and a γ conversion of YMCK image data for printing requires at least four LUTs for respective Y, M, C and K data. Accordingly, the color γ conversions using these LUTs consume a lot of time.
In addition to the above-mentioned types of image processes, there are also such image processes as storage in a memory, and edition. Each of processes, such as image reading, storage, and printing, includes a process of black-and-white image data, i.e., a monochrome-image mode process, regarding monochrome reading and monochrome recording, and a process of RGB image data or YMCK image data, i.e., a color-image mode process. Requests for the monochrome-image mode are often made even to a color processing machine; thus the color processing machine is, in general, capable of operating selectively in the monochrome-image mode.
In the monochrome-image mode, monochrome image data is processed. In the color-image mode, respective R (red), G (green) and B (blue) image data, i.e., image data of three colors, are processed in the reading mode; and respective Y (yellow), M (magenta), C (cyan) and K (black) image data, i.e., image data of four colors, are processed in the recording (printing) mode. Accordingly, when an image data transfer system of the monochrome-image mode is used in the color-image mode, an image data transfer of one line in the color-image mode takes a transfer time three or four times as much as in the monochrome-image mode. Accordingly, an image data process of one line in the color-image mode takes a processing time three or four times as much as in the monochrome-image mode.
To shorten this transfer/processing time, the color processing machine is preferred to use an image processor capable of inputting/outputting a plurality of items of image data simultaneously in parallel, and capable of applying data processes, such as correction and conversion, to a plurality of items of image data. Thereby, two colors (two series) or more of image data strings can be processed simultaneously in parallel in the color-image mode so as to increase the processing rate several times. In this case, however, since two colors (two series) or more of image data need to be transferred simultaneously in the color-image mode, the above-mentioned image processor cannot be used simply by a conventional image processing system having only one data transfer line exclusively for monochrome image data. Additionally, when the color processing machine using the above-mentioned image processor transfers and processes monochrome image data in the monochrome-image mode as performed in a conventional monochrome processing machine, the monochrome image data is processed series by series despite the image processor capable of processing two series or more of image data simultaneously; thus, the above-mentioned image processor cannot be fully utilized in the monochrome-image mode.
Data processes of the signal processing device disclosed in Japanese Laid-Open Patent Application No. 8-305329 are an insertion of “0” into line data by a switching control of the output data selector 9 by the CPU 12 in the line-memory mode, and a data conversion by the lookup table in the lookup-table mode. Thus, the signal processing device is not suitable for accelerating data conversion as above.
Besides, in an image data process, a pattern matching is frequently performed in various processing stages. For example, upon converting RGB image data into YMCK image data for recording, supplying the YMCK image data to a printer, and printing the YMCK image data on a sheet by the printer, it is preferable that a binary image, such as a character or a line, is binarized so as to record sharply. On the other hand, for a middle-tone image, such as a photograph, it is preferable that an application of a dot recording or a degree of a dot gradation is determined by converting image data into binary data or multivalued data (representing a small number of values); and by a gradation process (e.g., a dither process)) that realizes an area gradation (a middle tone) according to how many recording dots are distributed in a predetermined size, a smooth density transition is expressed. There is also a case where a binary image, such as a character or a line, and a bitmap image (a middle-tone image), such as a photograph or a picture, coexist in one document image. In this case, by using an image-area separation process of automatically judging whether RGB image data derives from a binary image area (hereinafter simply referred to as a character area), or a middle-tone area (hereinafter simply referred to as a photograph area), processes for the image data are automatically switched between a character-area process and a photograph-area process according to the judgment result, upon the gradation process.
Japanese Laid-Open Patent Application No. 5-48892 discloses a major example of the above-mentioned process switching technology, which is a digital color copying machine. This digital color copying machine comprises a means for judging a color from a color document, and a means for judging a character so as to divide the document into three area of a black character area, a color character area and a picture (photograph) area. Then, digital color copying machine performs processes suitable for the respective areas. Processes to be switched are as follows:
1) UCR process for adjusting an amount of black printer;
2) Filtering process, such as a smoothing process and an edge emphasis process; and
3) Gradation process for determining whether an area gradation (dither) for a photograph or a 1-dot gradation (binary) for a character, and a γ process involved therein.
In Japanese Laid-Open Patent Application No. 5-48892, the processes are switched according to areas as follows.
GradationFilteringprocess (γUCR processprocessprocess)BlackLarge amount ofIntense edgeBinarycharacterblack printeremphasisprocessareaColorSmall amount ofIntense edgeBinarycharacterblack printeremphasisprocessareaPictureSmall amount ofSmoothing (WeakDitherareablack printeredge emphasis)process
However, at boundaries between these three areas, properties of image data become discontinuous so as to cause image deterioration. Japanese Laid-Open Patent Application No. 7-162687 discloses a technology for preventing this image deterioration. In Japanese Laid-Open Patent Application No. 7-162687, the filtering process is not switched between two processes of a character process and a photograph process, but degrees of edge emphasis are switched variously according to a detected edge amount. Additionally, in Japanese Laid-Open Patent Application No. 9-321986, the gradation process (for a character area ˜ for a photograph area) is not switched between two processes of a character process and a photograph process, but dither patterns used in a dither process in the photograph process are switched variously according to a detected edge amount.
These techniques prevent the image deterioration considerably. However, when a document includes a thick character, and when a character judgment width of an image area separation process is larger than the width of the character in the document, a photograph judgment occurs in the middle of the character so that a character judgment and a photograph judgment coexist in the same character; accordingly, at a character/photograph boundary, a flashing or a white spotting occurs in switching the gradation processes. That is, a photograph area is subjected to a dither process for an area gradation. Assuming that image data of a 4-pixel area in the center of an image area has a density of 64 (¼ of the maximum density 256), and when the image area is judged to be a character area, the image data becomes white “0” by binarization, and accordingly, the 4-pixel area within the character line width becomes white. However, when the image area is judged to be a photograph area, one of the four pixels becomes black “1” and the other three pixels become white “0” by area gradation expression, and accordingly, a flashing may occur in which a black pixel appears in a white part of a character area, or a white spotting may occur in which a white spot appears in a black part when the image data has a high density. That is, a character image edge may become blurred, or when the image data has a high density, white spots may appear in a black part.
Thereupon, in Japanese Laid-Open Patent Application No. 2001-57633, an image-area separation is performed to RGB color image data, and when a character areas represented by the resulting image-area separation signals are distributed within predetermined intervals, the image-area separation signals corresponding to the intervals are corrected to represent character areas. In this correction process, the image-area separation signal of a present pixel is corrected so as to be continuous to the image-area separation signal of a preceding pixel.
In the above-mentioned image-area separation, it is judged whether image data of a present pixel (being processed) is chromatic or achromatic, and whether the present pixel exists in a picture area, a character-inside area (within a line width), or a character-edge area, so as to generate image-area data. In this course, a pattern comparison is performed in which it is checked which of image distribution matrixes (reference matrixes or patterns) for an edge area, a dot area or a white background-area, matches pixel information data of a pixel matrix (a matrix or a pattern to be judged) consisting of the present pixel and its peripheral pixels. Then, the judgment result is provided for the present pixel in the matrix to be judged. However, this pattern comparison is performed to each of the pixels composing the pixel matrix one by one; therefore, the matching for the entire pixel matrix takes a long time. This is one of factors prolonging a data processing time of a color image process. Thus, it is preferred that the processing rate of the image-area separation is increased.
In a digital full-color copying machine, not only RGB image data and YMCK image data converted therefrom are multi-bit multivalued data which include many data bits, but also, three sets of read R, G and B image data and four sets of output Y, M, C and K image data have to be processed respectively. Therefore, the digital full-color copying machine involves data amounts and image processes several times as many as a monochrome copying, which largely increases a data processing time. Therefore, it is preferred that the processing rate of image data processes is further increased.
Additionally, for the purpose of preventing areas represented by the image-area separation signal from fluctuating (transiting), an image-area judgment is corrected or smoothed so that the areas stably become continuous. In this case, the image-area judgment result of a preceding pixel is referred to in the image-area judgment of a present pixel. To perform this reference, an image processor retains the image-area judgment result of a preceding pixel. The image processor combines the image-area judgment result of the preceding pixel with image data of the matrix to be judged including the present pixel, and provides an LUT (Look Up Table) with judgment results corresponding to the combinations, and reads judgment result data from the LUT. However, this decreases the image processing rate of the image processor. It is preferable that this decrease in the image processing rate is avoided.
Further, image data, which is read by a CCD and converted by an A/D conversion into digital data, is subjected to a shading correction. For the purpose of setting correction data used in this correction, a reference white plate is read by a scanner for one line; maximum and minimum values of image data for the one line are detected; further one line without illumination (reading light) is read, and maximum and minimum values thereof are detected; and, according to the image data of the reference white plate for the one line and the detected maximum and minimum values, correction coefficients (coefficients for correcting reading distortions in a main-scanning line) for respective pixels on one line are calculated, and are written in a shading correction memory. Upon scanning a document, correction, coefficients corresponding to the same pixel positions with read image data are read from the shading correction memory so as to multiply the read image data therewith. The detection of the above-mentioned maximum and minimum values decreases processing rates of the image processor for performing processes other than the above-described process of processing the data read by the CCD. The detection of the maximum and minimum values of image data for the entire one line or for each division in the one line is often necessary in other image processes than the setting of the shading correction data. It is preferable that the detection of these maximum and minimum values is prevented from decreasing the processing rates of the image processor.